package com.action.sanction;

import java.sql.SQLException;
import java.util.ArrayList;

import com.db.appline.AppLineManager;
import com.db.appline.RepDateVO;
import com.db.member.MemberManager;
import com.db.member.MemberVO;
import com.db.sancdoc.VDocManager;
import com.db.sancdoc.VDocVO;
import com.db.sancdoc.VTDocManager;
import com.db.sancdoc.VTDocVO;
import com.opensymphony.xwork2.ActionContext;

public class appStatusAction {

	private int memno;

	private int myundecide;
	private int myend;
	private int mypostpone;
	private int myreturndoc;

	private int undecide;
	private int end;
	private int postpone;
	private int returndoc;

	private ArrayList<VDocVO> mylist = new ArrayList<VDocVO>();
	private ArrayList<VTDocVO> list = new ArrayList<VTDocVO>();

	private MemberVO vo = new MemberVO();

	private RepDateVO date = new RepDateVO();

	public RepDateVO getDate() {
		return date;
	}

	public MemberVO getVo() {
		return vo;
	}

	public void setMemno(int memno) {
		this.memno = memno;
	}

	public int getMemno() {
		return memno;
	}

	public int getMyundecide() {
		return myundecide;
	}

	public int getMyend() {
		return myend;
	}

	public int getMypostpone() {
		return mypostpone;
	}

	public int getMyreturndoc() {
		return myreturndoc;
	}

	public int getUndecide() {
		return undecide;
	}

	public int getEnd() {
		return end;
	}

	public int getPostpone() {
		return postpone;
	}

	public int getReturndoc() {
		return returndoc;
	}

	public ArrayList<VDocVO> getMylist() {
		return mylist;
	}

	public ArrayList<VTDocVO> getList() {
		return list;
	}

	public String execute() throws SQLException {
memno = Integer.parseInt((String) ActionContext.getContext().getSession().get("memno"));//////////////////////////////////////////////////
		
		vo = MemberManager.memberData(memno);

		myundecide = VDocManager.myUndecidedDoc(memno);
		myend = VDocManager.myEndDoc(memno);
		mypostpone = VDocManager.myPostponeDoc(memno);
		myreturndoc = VDocManager.myReturnDoc(memno);

		undecide = VTDocManager.undecidedDoc(memno);
		end = VTDocManager.endDoc(memno);
		postpone = VTDocManager.postponeDoc(memno);
		returndoc = VTDocManager.returnDoc(memno);

		date = AppLineManager.getRepdate();
		
		mylist = VDocManager.myRecentUndecided(memno);
		
		list = VTDocManager.recentUndecided(memno);



		return "success";
	}
}
